import axios from 'axios'
import { API_BASE_URL } from '../config/api'

// 统一导出所有接口模块
export * from './auth'
export * from './menu'
export * from './resource'
// 其他接口模块按需添加 

export function getDepartmentUserTree() {
  return axios.get(`${API_BASE_URL}/actions/departmentManage/getDepartMentUser`)
}

export function getAllUserList() {
  return axios.get(`${API_BASE_URL}/actions/userManageUrl/list`)
}

// 获取资源（权限）列表
export function getResourceList(params = {}) {
  return axios.get(`${API_BASE_URL}/actions/resourceManage/getResourceList`, { params })
}

// 新增/更新资源（权限）
export function saveOrUpdateResource(data) {
  return axios.post(`${API_BASE_URL}/actions/resourceManage/saveOrUpdateResource`, data, {
    headers: { 'Content-Type': 'application/json' }
  })
} 